﻿using FluentNHibernate.Cfg.Db;

namespace NHibernate.Drivers.Azure.TableStorage
{
    public class AzureConfiguration : PersistenceConfiguration<AzureConfiguration, ConnectionStringBuilder>
    {
        public AzureConfiguration()
        {
            ConnectionString("uri=http://127.0.0.1:10002/devstoreaccount1/; account_name=devstoreaccount1; shared_key=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");
        }

        public static AzureConfiguration TableStorage
        {
            get
            {
                return new AzureConfiguration()
                    .Provider(typeof (TableStorageConnectionProvider).AssemblyQualifiedName)
                    .Dialect(typeof (TableStorageDialect).AssemblyQualifiedName)
                    .Driver(typeof (TableStorageDriver).AssemblyQualifiedName);
            }
        }

    }
}